import request from '@/utils/request'

export function getListApi(data) {
  return request({
    url:'/sms/template/all',
    method:'get',
    params: data
  })
}

export function createTemplateApi(data) {
  return request({
    url:'/sms/template/add',
    method:'post',
    data: data
  })
}

export function editTemplateApi(data) {
  return request({
    url:'/sms/template/update',
    method:'post',
    data: data
  })
}

export function deleteTemplateApi(templateId) {
  return request({
    url: `/sms/template/delete?templateId=${templateId}`,
    method:'delete',
  })
}

export function sendApi(data) {
  return request({
    url:'/sms/template/city/send',
    method:'post',
    data: data
  })
}

export function getCityListApi(data) {
  return request({
    url:'/custom/city/group',
    method:'get',
    params: data
  })
}

export function getHistoryApi(data) {
  return request({
    url:'/sms/select/send/history',
    method:'post',
    data: data
  })
}

export function sendMessageApi(data) {
  return request({
    url: '/sms//template/city/send',
    method: 'post',
    data: data
  })
}
